package net.xuele.learn.ohc;

import org.caffinitas.ohc.OHCache;
import org.caffinitas.ohc.OHCacheBuilder;

import java.util.Scanner;

/**
 * @Author patrick
 * @Date 2023/3/1 14:27
 * @Description
 */
public class OhcReadDemo {

    public static OHCache<String, String> ohCache = OHCacheBuilder.<String, String>newBuilder()
            .keySerializer(OhcDemo.stringSerializer)
            .valueSerializer(OhcDemo.stringSerializer)
            .build();

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            String k = sc.next();
            System.out.println(k + "------" + ohCache.get(k));
        }
        sc.close();
    }
}
